-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goplus debug support #49
Conversation
Modify the language id so that it is unique. Only trigger activation extension for files supported by gop language
Modify the initial debug run configuration and default debug run configuration. Change the debugger type to gop. Make it unique.
src/goDebugFactory.ts
Outdated
); | ||
throw new Error('Cannot find Delve debugger (dlv dap)'); | ||
throw new Error('Cannot find Gop/go debugger (gopdlv dap)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gop/go
=> Go/Go+
src/goDebugFactory.ts
Outdated
@@ -442,7 +442,7 @@ export class DelveDAPOutputAdapter extends ProxyDebugAdapter { | |||
command: 'runInTerminal', | |||
arguments: { | |||
kind: console, | |||
title: `Go Debug Terminal (${launchAttachArgs.name})`, | |||
title: `Gop Debug Terminal (${launchAttachArgs.name})`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gop
=> Go+
src/debugAdapter/goDebug.ts
Outdated
} | ||
} catch (e) { | ||
logError(`The program "${program}" does not exist: ${e}`); | ||
return reject('The program attribute must point to valid directory, .go file or executable.'); | ||
return reject(`The program "${program}" does not exist: ${e}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reject message is changed.
src/debugAdapter/goDebug.ts
Outdated
env['GOPATH'] ? ', ' + env['GOPATH'] : '' | ||
} or ${getEnvPath()}` | ||
); | ||
return reject( | ||
'Cannot find Delve debugger. Install from https://github.com/go-delve/delve & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".' | ||
'Cannot find Gop/go debugger. Install from https://github.com/goplus/gopdlv & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gop/go => Go/Go+
src/debugAdapter/goDebug.ts
Outdated
@@ -667,7 +668,7 @@ export class Delve { | |||
|
|||
if (!existsSync(launchArgs.dlvToolPath)) { | |||
return reject( | |||
'Cannot find Delve debugger. Install from https://github.com/go-delve/delve & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".' | |||
'Cannot find Gop/go debugger. Install from https://github.com/goplus/gopdlv & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as same
src/goDebugConfiguration.ts
Outdated
@@ -68,22 +68,22 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr | |||
} | |||
}, | |||
{ | |||
label: 'Go: Attach to local process', | |||
label: 'Gop: Attach to local process', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gop => Go+
src/goDebugConfiguration.ts
Outdated
request: 'attach', | ||
mode: 'local', | ||
processId: 0 | ||
} | ||
}, | ||
{ | ||
label: 'Go: Connect to server', | ||
label: 'Gop: Connect to server', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as same
src/goDebugFactory.ts
Outdated
@@ -18,17 +18,17 @@ import { getWorkspaceFolderPath } from './util'; | |||
import { getEnvPath, getBinPathFromEnvVar } from './utils/pathUtils'; | |||
|
|||
export function activate(ctx: vscode.ExtensionContext) { | |||
const debugOutputChannel = vscode.window.createOutputChannel('Go Debug'); | |||
const debugOutputChannel = vscode.window.createOutputChannel('Gop Debug'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gop => Go+
src/goFillStruct.ts
Outdated
if (!editor.document.fileName.endsWith('.go')) { | ||
vscode.window.showInformationMessage('Current file is not a Go file.'); | ||
if (!(editor.document.fileName.endsWith('.go') || editor.document.fileName.endsWith('.gop'))) { | ||
vscode.window.showInformationMessage('Current file is not a Go or Gop file.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go or Gop
=> Go/Go+
src/goGenerateTests.ts
Outdated
@@ -54,12 +54,12 @@ export const toggleTestFile: CommandFactory = () => () => { | |||
} | |||
const currentFilePath = editor.document.fileName; | |||
if (!currentFilePath.endsWith('.go') && !currentFilePath.endsWith('.gop')) { | |||
vscode.window.showInformationMessage('Cannot toggle test file. File in the editor is not a Go file.'); | |||
vscode.window.showInformationMessage('Cannot toggle test file. File in the editor is not a Go or Gop file.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as same
[Git-flow] Hi @tsingbx, There are some suggestions for your information: Rebase suggestions
Which seems insignificant, recommend to use For other If you have any questions about this comment, feel free to raise an issue here: |
No description provided.